package com.mvp.shq.washer.ui.reg;

import com.mvp.shq.washer.entity.BaseResult;
import com.mvp.shq.washer.entity.TokenBean;
import com.mvp.shq.washer.http.Api;
import com.mvp.shq.washer.http.RxSchedulers;

import io.reactivex.Observable;

/**
 * Created by Administrator on 2017/8/24.
 */

public class RegModel implements RegConstract.Model {
    @Override
    public Observable<BaseResult<TokenBean>> reg(String mobile, String pwd, String code, String timestamp, String sign) {
        return Api.getInstance().service
                .reg(mobile,pwd,code,timestamp,sign)
                .compose(RxSchedulers.io_main());
    }

    @Override
    public Observable<BaseResult<String>> getCode(String mobile) {
        return Api.getInstance().service
                .code(mobile)
                .compose(RxSchedulers.io_main());
    }
}
